What is @commitlint/config-angular?
@commitlint/config-angular is a shareable configuration for commitlint that follows the Angular commit message guidelines. It helps enforce a consistent commit message format in your project, which is particularly useful for projects that follow the Angular style guide.
Enforcing Commit Message Format
This configuration enforces the Angular commit message format. By extending `@commitlint/config-angular`, your project will adhere to the Angular commit message conventions, ensuring consistency and readability.
{
"extends": ["@commitlint/config-angular"]
}
Customizing Rules
You can customize the commit message rules by extending the default configuration. In this example, the `type-enum` rule is customized to include specific types of commit messages such as `feat`, `fix`, `docs`, etc.
{
"extends": ["@commitlint/config-angular"],
"rules": {
"type-enum": [
2,
"always",
[
"feat",
"fix",
"docs",
"style",
"refactor",
"test",
"chore"
]
]
}
}